<script type="text/javascript">
  window.USER_ID = {{current_user.id}};
  window.HOST_URL = '{{request.host_url[:-1]}}';
  window.PUBNUB_PUBLISH = '{{config.PUBNUB_PUBLISH}}';
  window.PUBNUB_SUBSCRIBE = '{{config.PUBNUB_SUBSCRIBE}}';
  window.HOST_URL = '{{request.host_url[:-1]}}';
</script>

{% if config.DEVELOPMENT %}
  {% for module in config.SCRIPTS_MODULES %}
    {% for script in config.SCRIPTS[module] %}
      <script type='text/javascript' src="/p/{{script|replace('.coffee', '.js')|replace('src/coffee', 'dst/js')}}?{{config.CURRENT_VERSION_ID}}"></script>
    {% endfor %}
  {% endfor %}
{% else %}
  {% for module in config.SCRIPTS_MODULES %}
    <script type='text/javascript' src="/p/min/js/{{module}}.min.js?{{config.CURRENT_VERSION_ID}}"></script>
  {% endfor %}
{% endif %}
